import request from "@/utils/request";

//获取定制耳机套商品详情
export function getItemDetail() {
  return request({
    url: "/diy/ear_muff/item_detail"
  });
}
//保存耳机套模板
export function saveEarMuffTemp(data) {
  return request({
    url: "/ear_muff_samples",
    method: "post",
    data: data
  });
}
//更新模板
export function updateEarMuffTemp(data) {
  return request({
    url: "/ear_muff_samples/" + data.id,
    method: "put",
    data: data
  });
}
//查询指定条件的耳机套模板
export function getEarMuffTemplates(queryVo) {
  return request({
    url: "/ear_muff_samples/search",
    method: "post",
    data: queryVo
  });
}
//根据ID查询已存在的模板
export function getEarMuffTemplateById(id) {
  return request({
    url: "/ear_muff_samples/" + id
  });
}
//删除模板
export function deleteTemplate(id) {
  return request({
    url: '/ear_muff_samples/'+id,
    method: 'delete'
  })
}
